<template>
    <div class="upload-question">
      <Bar />
      <div class="content">
        <div class="textarea-container">
          <label>题目：</label>
          <textarea class="textarea-input"></textarea>
        </div>
        <div class="textarea-container">
          <label>答案与解析：</label>
          <textarea class="textarea-input"></textarea>
        </div>
      </div>
      <div class="spacer"></div>
      <div class="question-buttons">
        <button @click="nextQuestion">下一题</button>
        <button @click="upload">上传</button>
      </div>
    </div>
</template>

<script>
import Bar from './components/bar3.vue';

export default {
  components: {
    Bar
  },
  methods: {
    nextQuestion() {
      console.log("下一题");
    },
    upload() {
      console.log("上传");
    }
  }
}
</script>

<style scoped>
.upload-question {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.content {
    flex-grow: 1;
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
}

.textarea-container {
    margin-bottom: 20px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

label {
    display: block;
    margin-bottom: 5px;
    text-align: left;
}

.textarea-input {
    width: calc(100% - 30px);
    height: 200px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    resize: none;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.spacer {
    flex-grow: 1;
}

.question-buttons {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

button {
    width: 45%;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}
</style>

